/**
 * CLEAN TASKs
 * @Author: jiangcheng198745@hotmial.com
 * @Date: 2016/07/09
 */
'use strict';

import gulp from 'gulp';
import del from 'del';

import messageLogger from '../utils/message.gulp';
import config from '../gulp.config';

gulp.task('clean', [
    'clean:build',
    'clean:dist'
]);

gulp.task('clean:css', () => {
    var files = [
        config.build + 'styles/**/*.css',
        config.build + 'styles/**/*.css.map'
    ];
    messageLogger('Clean CSS files', files);

    return del(files);
});

gulp.task('clean:build', () => {
    let files = [
        config.build
    ];
    messageLogger("Cleaning build directory", files);
    return del(files);
});

gulp.task('clean:dist', () => {
    let files = [
        config.dist
    ];
    messageLogger("Cleaning dist directory", files);
    return del(files);
});